package com.asj.house.client;

import com.asj.house.config.feign.HouseRoomDetailFeignConfig;
import com.asj.house.domain.HouseRoomDetail;
import com.asj.house.returns.RespEntity;
import com.asj.house.returns.RespTable;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "houseRoomDetailClient", url = "${manage.url}", configuration = HouseRoomDetailFeignConfig.class)
public interface HouseRoomDetailClient {

    /**
     * 房源详细信息列表
     * @param page
     * @param limit
     * @return
     */
    @GetMapping("/house-room-detail/list")
    RespTable listHouseRoomDetail(@RequestParam(value = "page", required = true) Integer page,
                                  @RequestParam(value = "limit", required = true) Integer limit);

    /**
     * 搜索房源详细信息
     * @param page
     * @param limit
     * @param name
     * @return
     */
    @GetMapping("/house-room-detail/list")
    RespTable searchHouseRoomDetail(@RequestParam("page") Integer page,
                                    @RequestParam("limit") Integer limit,
                                    @RequestParam("name") String name);

    /**
     * 编辑房源详细信息
     * @param houseRoomDetail
     * @return
     */
    @PutMapping("house-room-detail/update")
    RespEntity updateHouseRoomDetail(@RequestBody HouseRoomDetail houseRoomDetail);

    /**
     * 中国地图
     * @return
     */
    @GetMapping("house-room-detail/chinaMap")
    RespEntity chinaMap();

    /**
     * 省份地图
     * @param province
     * @return
     */
    @GetMapping("house-room-detail/provinceMap")
    RespEntity provinceMap(@RequestParam("province") String province);
}
